import http from '@/api/http'

export function login(data: any) {
  return http.post({
    url: '/user/login',
    data: data,
  })
}

export function logout(param?: any) {
  return http.get({
    url: '/user/logout',
    params: param,
  })
}

export function getCaptcha() {
  return http.get({
    url: '/user/captcha',
  })
}

export function getUserMenuList(param?: any) {
  return http.get({
    url: '/user/menu/list',
    params: param,
  })
}

export function getUserProfileList(param?: any) {
  return http.get({
    url: '/user/profile/list',
    params: param,
  })
}

export function updateUserProfile(data?: any) {
  return http.post({
    url: '/user/profile/update',
    data: data,
  })
}
export function updateUserProfilePassword(data?: any) {
  return http.post({
    url: '/user/profile/password/update',
    data: data,
  })
}
